#include <iostream>

#include "cg_geometric_api.h"

using namespace cg;

int main()
{
	Solver solver = CreateSolver();

	Point p1 = CreatePoint( solver, 3., 4. ), p2 = CreatePoint( solver, 5., 6. ), p3 = CreatePoint( solver, 1., 8. ), p4 = CreatePoint( solver, 2, -3 );
	LineSegment l1 = CreateLineSegment( solver, p1, p2 ), l2 = CreateLineSegment( solver, p3, p4 );

	MakeParallel( solver, l1, l2 );

	if ( Solve( solver ) )
	{
		std::cout << VariableValue( solver, l1.p1.x ) << " " << VariableValue( solver, l1.p1.y ) << "\n";
		std::cout << VariableValue( solver, l1.p2.x ) << " " << VariableValue( solver, l1.p2.y ) << "\n";
		std::cout << VariableValue( solver, l2.p1.x ) << " " << VariableValue( solver, l2.p1.y ) << "\n";
		std::cout << VariableValue( solver, l2.p2.x ) << " " << VariableValue( solver, l2.p2.y ) << "\n";
	}
}